package com.kunbo.cn.dao.system;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;
import com.kunbo.cn.entity.system.Depart;
public interface DepartDao extends CrudRepository<Depart, String>,JpaRepository<Depart, String>,JpaSpecificationExecutor<Depart>{
	/**
	 * 自定义条件查询
	 * <p>Title: findUserInfo</p>
	 * <p>Description: </p>
	 * @param tel
	 * @param pageable
	 * @return
	 */
//	@Query("select u.name,d.address,d.tel  from User u , UserInfo d " +
//            "where u.id = d.userId  and  d.tel = ?1 ")
//    List<Object> findUserInfo(String tel, Pageable pageable);
	
	/**
	 * 
	 * <p>Title:name</p>
	 * <p>Description:根据名称模糊查询部门 </p>
	 * @param lastname
	 * @param pageable
	 * @return
	 */

    Page<Depart> findByNameLike(String name, Pageable pageable);


}
